<?php

require_once("core.php");

class coreController
{
	public $view;
	public $model;
  public $session;
	public $config;
	
	public function __construct($name)
	{
		$this->config = new Config;

    $this->session = new Session;

		$this->view = new Smarty();

		$this->view->template_dir = $this->config->TEMPLATES_DIR;
		$this->view->compile_dir = $this->config->COMPILE_DIR;

		$this->view->assign('cont_name', $name);

    require_once('../models/' . $this->model . '.php');
    $this->model = new $this->model;
	}
	
	public function showTemplate($tpl)
	{
		$this->view->display($tpl);
	}
}

?>